import request from '@/utils/request'
// 查询企业部门列表的接口
export function getDepartments () {
    return request({
      url: '/company/department',
      method: 'get',
    })
  }

  // 删除列表的接口
export function delDepartments (id) {
  return request({
    url: '/company/department/'+id,
    method: 'delete',
  })
}

// 新增公司部门的请求
export function addDepartments (data) {
  return request({
    url: '/company/department/',
    method: 'post',
    data
  })
}

// 获取部门详情的请求
export function getDeptsDetail (id) {
  return request({
    url: '/company/department/'+id,
    method: 'get',
  })
}

//修改部门详情的请求
export function editDepts (data) {
  return request({
    url: '/company/department/'+data.id,
    method: 'put',
    data
  })
}
